package com.igeek.javase.ch04.person;

import com.igeek.javase.ch04.person.Person;

/*
 *@author wangpeng
 *2023/7/13 10:36
 *@description TODO
 */
public class PersonTest {
        public static void main(String[] args) {
            Person person1 = new Person("张三", 25, true);
            Person person2 = new Person("李四", 23, false);
            Person person3 = new Person("王五", 20, true);

            person1.marry(person2);  // 输出：恭喜张三和李四结婚！
            person1.marry(person3);  // 输出：女方未达到结婚年龄！
            person2.marry(person3);  // 输出：恭喜李四和王五结婚！
            person1.marry(person2);  // 输出：某一方已婚！
        }
}

